import http from './public'
const baseUrl = process.env.API_BASEURL

export const productDetail = (params) => {
	return http.fetchPost(`${baseUrl}/product/detail`, params)
}

export const getProductList = (params) => {
	return http.fetchPost(`${baseUrl}/search/getProductList`, params)
}

export const getIndexInfo = (params) => {
	return http.fetchPost(`${baseUrl}/index/getIndexInfo`, params)
}

export const login = (params) => {
	return http.fetchPost(`${baseUrl}/user/login`, params)
}

export const register = (params) => {
	return http.fetchPost(`${baseUrl}/user/register`, params)
}
